<?php echo $this->fetch('header.html'); ?>
<script type="text/javascript">
//<!CDATA[
$(function(){
    // multi-select mall_gcategory
    $('#gcategory').length>0 && gcategoryInit("gcategory");
});
//]]>
</script>
<div class="mrightTop1 info">
  <div class="fontl">
    <form method="get">
      <input type="hidden" name="app" value="promotion" />
      商品名称:
      <input class="queryInput" type="text" name="goods_name" value="<?php echo htmlspecialchars($_GET['goods_name']); ?>" />
      店铺名称:
      <input class="queryInput" type="text" name="store_name" value="<?php echo htmlspecialchars($_GET['store_name']); ?>" />
      秒杀名称:
      <input class="queryInput" type="text" name="pro_name" value="<?php echo htmlspecialchars($_GET['pro_name']); ?>" />
      <span style="position: relative; top: 5px;">
          <input type="submit" class="formbtn" value="查询" />
      <?php if ($_GET['pro_name'] || $this->_var['query']['goods_name'] || $this->_var['query']['store_name']): ?>
      <a class="formbtn1" href="index.php?app=promotion">撤销检索</a>
      <?php endif; ?>
      </span>
    </form>
  </div>
  <div class="fontr"><?php echo $this->fetch('page.top.html'); ?></div>
</div>
<div class="tdare">
  <table width="100%" cellspacing="0" class="dataTable">
    <?php if ($this->_var['promotion_list']): ?>
    <tr class="tatr1">
      <td width="10%" class="firstCell"><input type="checkbox" class="checkall" /></td>
      <td width="30%"><span ectype="order_by" fieldname="goods_name">商品名称</span></td>
      <td width="30%"><span ectype="order_by" fieldname="goods_name">秒杀名称</span></td>
      <td width="10%"><span ectype="order_by" fieldname="store_name">店铺名称</span></td>
      <td width="10%"><span ectype="order_by" fieldname="start_time">开始时间</span></td>
      <td class="table-center"><span ectype="order_by" fieldname="pro_recommended">促销推荐</span></td>
      <td>操作</td>
    </tr>
    <?php endif; ?>
    <?php $_from = $this->_var['promotion_list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'goods');if (count($_from)):
    foreach ($_from AS $this->_var['goods']):
?>
    <tr class="tatr2">
      <td class="firstCell"><input type="checkbox" class="checkitem" value="<?php echo $this->_var['goods']['pro_id']; ?>"/></td>
      <td><?php echo htmlspecialchars($this->_var['goods']['goods_name']); ?></td>
      <td><span ectype="inline_edit" fieldname="pro_name" fieldid="<?php echo $this->_var['goods']['pro_id']; ?>" required="1" class="editable" title="单击可以编辑"><?php echo htmlspecialchars($this->_var['goods']['pro_name']); ?></span></td>
      <td><?php echo htmlspecialchars($this->_var['goods']['store_name']); ?></td>
      <td><?php echo local_date("Y-m-d",$this->_var['goods']['start_time']); ?></td>
      <td class="table-center"><?php if ($this->_var['goods']['pro_recommended']): ?><img src="templates/style/images/positive_enabled.gif" ectype="inline_edit" fieldname="pro_recommended" fieldid="<?php echo $this->_var['goods']['pro_id']; ?>" fieldvalue="1" title="单击可以编辑"/><?php else: ?><img src="templates/style/images/positive_disabled.gif" ectype="inline_edit" fieldname="pro_recommended" fieldid="<?php echo $this->_var['goods']['pro_id']; ?>" fieldvalue="0" title="单击可以编辑"/><?php endif; ?></td>
      <td><a target="_blank" href="<?php echo $this->_var['site_url']; ?>/index.php?app=goods&amp;id=<?php echo $this->_var['goods']['goods_id']; ?>">查看</a></td>
    </tr>
    <?php endforeach; else: ?>
    <tr class="no_data info">
      <td colspan="8">没有符合条件的记录</td>
    </tr>
    <?php endif; unset($_from); ?><?php $this->pop_vars();; ?>
  </table>
  <?php if ($this->_var['promotion_list']): ?>
  <div id="dataFuncs">
    <div id="batchAction" class="left paddingT15">
      <input class="formbtn batchButton" type="button" value="删除" name="id" uri="index.php?app=promotion&act=drop&ret_page=<?php echo $this->_var['page_info']['curr_page']; ?>" presubmit="confirm('您确定要删除它吗？')" />
    </div>
    <div class="pageLinks"><?php echo $this->fetch('page.bottom.html'); ?></div>
   <?php endif; ?>
  </div>
  <div class="clear"></div>
</div>
<?php echo $this->fetch('footer.html'); ?>